Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11-implemented-second-part-of-tests-Order-CartItem-User-ShoppingCart #13

Merged
merged 15 commits into from
Oct 25, 2023

Conversation

RostyslavOnysh
Copy link
Owner

@RostyslavOnysh RostyslavOnysh commented Oct 24, 2023

Copy link

@Ivan95kos Ivan95kos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, with minor comments:

For integration testing Controllers and Repositories,
It would help if you used real DB with data instead of Mock classes and Mock answers

@ContextConfiguration(classes = {AuthControllerTest.class})
@ExtendWith(SpringExtension.class)
@WebMvcTest(AuthControllerTest.class)
class AuthControllerTest {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class AuthControllerTest {
class AuthControllerIntegrationTest {

@ContextConfiguration(classes = {ShoppingCartControllerTest.class})
@ExtendWith(SpringExtension.class)
@WebMvcTest(ShoppingCartControllerTest.class)
class ShoppingCartControllerTest {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


@DataJpaTest
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
class OrderRepositoryTest {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class OrderRepositoryTest {
class OrderRepositoryIntegrationTest {


@DataJpaTest
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.AUTO_CONFIGURED)
class ShoppingCartRepositoryTest {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class ShoppingCartRepositoryTest {
class ShoppingCartRepositoryIntegrationTest {

@RostyslavOnysh RostyslavOnysh merged commit 1c1e728 into main Oct 25, 2023
2 checks passed
@RostyslavOnysh RostyslavOnysh deleted the secondPartOfTest branch November 7, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants